package com.dajie.pt.service.base;

import java.io.Serializable;
import java.util.List;


public interface BaseService<E, PK extends Serializable>
{

	List<E> getByIds(final String[] ids);

	E get(final PK id);

	List<E> findAll();

	Object save(final E entity);

	void update(final E entity);

	void saveOrUpdate(final E entity);

	void removeById(final PK id);

	void removeByIds(final String[] ids);

	void saveOrUpdateWithLog(Object logInfo, final E entity);

	void removeByIdWithLog(Object logInfo, final PK id);

	void removeByIdsWithLog(Object logInfo, final String[] ids);

	boolean isPropertyUnique(final String property, final String orgValue, final String newValue);

	boolean isUnique(final E entity, final String uniquePropertyNames);

	List<E> findBy(final Object... params);

	E findUniqueBy(final Object... params);

}